package com.yangit.temp.common.entity;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

@Component
@ConfigurationProperties(prefix = "myframe.preuser")
@Validated
public class PreUser{
	
    private String name;
    private int age;
    private String address;
    private String phone;
    private String desc;
    private Date date;
    private List<String> hobby;
    private List<Friend> friends;
    private Map<String,Integer> brother;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public List<String> getHobby() {
		return hobby;
	}
	public void setHobby(List<String> hobby) {
		this.hobby = hobby;
	}
	public List<Friend> getFriends() {
		return friends;
	}
	public void setFriends(List<Friend> friends) {
		this.friends = friends;
	}
	public Map<String, Integer> getBrother() {
		return brother;
	}
	public void setBrother(Map<String, Integer> brother) {
		this.brother = brother;
	}
	@Override
	public String toString() {
		return "PreUser [name=" + name + ", age=" + age + ", address=" + address + ", phone=" + phone + ", desc=" + desc
				+ ", date=" + date + ", hobby=" + hobby + ", friends=" + friends + ", brother=" + brother + "]";
	}
    
}

class Friend {
    private String name;
    private int age;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	@Override
	public String toString() {
		return "Friend [name=" + name + ", age=" + age + "]";
	}
    
}